package com.sdslzyxyhtgl.modules.zy.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sdslzyxyhtgl.common.utils.PageUtils;
import com.sdslzyxyhtgl.common.utils.Query;

import com.sdslzyxyhtgl.modules.zy.dao.SchoolnewsDao;
import com.sdslzyxyhtgl.modules.zy.entity.SchoolnewsEntity;
import com.sdslzyxyhtgl.modules.zy.service.SchoolnewsService;


@Service("schoolnewsService")
public class SchoolnewsServiceImpl extends ServiceImpl<SchoolnewsDao, SchoolnewsEntity> implements SchoolnewsService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<SchoolnewsEntity> page = this.page(
                new Query<SchoolnewsEntity>().getPage(params),
                new QueryWrapper<SchoolnewsEntity>().orderBy(true,false,"id")
        );

        return new PageUtils(page);
    }

}